<?php
$input = 145;

if ($input < 102) {
    echo "no";
}

for ($i = 102; $i <= $input; $i++) {
    $isFound = true;
    $digits = array();
    $currentIndexAsString = strval($i);

    array_push($digits, $currentIndexAsString[0]);

    for ($j = 1; $j < strlen($currentIndexAsString); $j++) {
        if (array_search($currentIndexAsString[$j], $digits) !== false || $j > 987) {
            $isFound = false;
            break;
        }

        array_push($digits, $currentIndexAsString[$j]);
    }

    if (sizeof($digits) === 3 && $isFound === true) {
        echo $currentIndexAsString . "\n";
    }
}
?>